package edu.gdkm.demo;

public class Demo13 {
    //PI/4=1-1/3+1/5-1/7+1/9...      =3.14159265358979323846
    public static void main(String[] args) {
        double PI=1;
        double i=3;
        int x=2;
        while(i<1000000000l){
           PI = PI - 1/i;
           i = -(i + x);
           x=-x;
        }
        System.out.println(PI*4);
    }
}
